package com.soft.mainsite.mybatis.mapper;

import com.soft.mainsite.mybatis.model.TCmsCategory;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * TCmsCategoryMapper
 *
 * @author Jin
 * @create 2017-06-16
 **/
public interface TCmsCategoryMapper extends Mapper<TCmsCategory> {

    /**
     * 根据站点id查询所有
     *
     * @param siteId
     * @param isCommon
     * @return
     */
    List<TCmsCategory> listAllBySiteId(@Param("siteId") Integer siteId, @Param("isCommon") Integer isCommon);

    /**
     * 查询所有ES可以搜索的栏目id
     *
     * @return
     */
    Integer[] selectAllowSearchCategoryIds();

    /**
     * 查询站点所有栏目
     *
     * @param siteId
     * @return
     */
    List<TCmsCategory> getAllCategoryTplBySiteId(@Param("siteId") Integer siteId);
}